package
{
	import flash.display.Sprite;
	import logout.loader.LoaderMC;
	import flash.events.Event;
	import flash.display.StageScaleMode;
	import flash.display.StageAlign;
	import bi.conf.Configuration;
	import flash.net.ObjectEncoding;
	import logout.scenes.home.views.SignInPage;
	
	[ SWF( backgroundColor='0xffffff', frameRate='30' , width='1000', height='600')]
	public class LogOutLoader extends Sprite
	{
		
		// compile
		//var s : SignInPage;
		
		function LogOutLoader() {
			startSiteLoader();

			stage.scaleMode = StageScaleMode.NO_SCALE;
			stage.align = StageAlign.TOP_LEFT;
			stage.addEventListener( Event.RESIZE, onResize );
			onResize();
		}
		
		private function startSiteLoader() : void {
			
			if( loaderInfo.parameters.confFile == undefined ) loaderInfo.parameters.confFile = "../assets/xmls/conf.xml";
			trace( loaderInfo.parameters );
			trace( loaderInfo.parameters.confFile );
			loaderMc = new LoaderMC();
			loaderMc.addEventListener( Event.COMPLETE , onLoaded );
			addChild( loaderMc );
		}
		
		private function onLoaded( e : Event ) : void {
			addChild( loaderMc.site );
			removeChild( loaderMc );
		}
		
		private function onResize( e : Event = null ) : void {
			loaderMc.x = stage.stageWidth/2;
			loaderMc.y = stage.stageHeight/2;
		}
		
		private var loaderMc : LoaderMC;
	}
}